package ooday05;
import java.util.TimerTask;

//匿名内部类的练习-----定时器
public class Timer {
    public static void main(String[] args) {


        java.util.Timer timer = new java.util.Timer();
        int interval = 1000;
        timer.schedule(new TimerTask() {
            public void run() {
                System.out.println("！！！");
            }
        },interval,interval);
    }
}
